package com.example.mine.mvp.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.RecyclerView;

import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.example.mine.R;

/**
 * 作者: admins
 * 时间: 2019/6/28 15:30
 * 描述: 我的动态
 * 来源
 */


@Route(path = "/com/dynamic")
public class DynamicActivity extends AppCompatActivity {
    private RecyclerView rvDynamic;
    private ImageView imageView;
    @Autowired
    String user_id;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.ac_dynamic);
        ARouter.getInstance().inject(this);
        initViews();
    }

    private void initViews() {
        rvDynamic = findViewById(R.id.rv_dynamic);
        imageView = findViewById(R.id.iv_user);
        if(TextUtils.isEmpty(user_id)){
            return;
        }
        Log.d("user_id ******",user_id);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(DynamicActivity.this,DynamicDetailActivity.class));
            }
        });
    }
}
